﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace EFDemo
{
    public class MyContext  : Microsoft.EntityFrameworkCore.DbContext
    {
        public MyContext()
        {
            
        }
        public DbSet<School> Schools { get; set; }
        public DbSet<Major> Majors { get; set; }
        public DbSet<Student> Students { get; set; }

        public DbSet<School2> SchoolsNoFK { get; set; }
        public DbSet<Major2> MajorsNoFK { get; set; }
        public DbSet<Student2> StudentsNoFK { get; set; }
        public DbSet<StudentMajor2> StudentMajorsNoFK { get; set; }

        
        protected override void OnConfiguring(DbContextOptionsBuilder options)
        { 
             options.UseSqlite("Data Source=/Users/32wudao/RiderProjects/EFCore/EFDemo/efdemo.db");
            options.LogTo(Console.WriteLine, Microsoft.Extensions.Logging.LogLevel.Information);
        }
    }
}
